Detecting device installation and removal on a port

ABSTRACT

One example provides a system. The system includes a serial port and a circuit coupled to the serial port. The circuit is to detect an installation or removal of a device to the serial port and to remove power provided to the serial port in response to the detection.

BACKGROUND

A computer system may include any suitable number of ports, and eachport may have a different function. One type of port is a serial port. Aserial port may be configured to operate in an unpowered mode or in apowered mode. Any serial device having the proper connector, however,may be installed on the serial port whether or not the serial device isconfigured to operate in the unpowered mode or the powered mode.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating one example of a system.

FIG. 2 is a block diagram illustrating one example of a serial portdetection/switching circuit.

FIG. 3 is a table illustrating one example of the signal states fordifferent modes of the serial port.

FIG. 4A is a diagram illustrating one example of a serial port.

FIG. 4B is a diagram illustrating one example of a port detect pinintegrated into the metal shielding of the serial port.

DETAILED DESCRIPTION

In the following detailed description, reference is made to theaccompanying drawings which form a part hereof, and in which is shown byway of illustration specific examples in which the disclosure may bepracticed. It is to be understood that other examples may be utilizedand structural or logical changes may be made without departing from thescope of the present disclosure. The following detailed description,therefore, is not to be taken in a limiting sense, and the scope of thepresent disclosure is defined by the appended claims. It is to beunderstood that features of the various examples described herein may becombined with each other, unless specifically noted otherwise.

A serial port may be configured to operate in an unpowered mode, a +5volt powered mode, or a +12 volt powered mode. Any suitable serialdevice, however, may be installed on the serial port whether or not theserial device is configured to operate in the unpowered mode, the +5volt powered mode, or the +12 volt powered mode. Accordingly, if aserial device configured to operate in the unpowered mode is installedon a serial port configured to operate in the +5 volt powered mode orthe +12 volt powered mode, the serial device may be damaged. Thisdisclosure describes a serial port and serial port detection/switchingcircuit including a port detect pin to detect the installation and/orthe removal of a serial device on the serial port. In response todetecting the installation or removal of a serial device on the serialport, the serial port is reset to operate in the unpowered mode. In thisway, when a serial device is installed on the serial port, the serialdevice will not be damaged. Once the serial device is installed on theserial port, the user may be prompted to select the proper serial portmode (i.e., unpowered, +5 volts, or +12 volts) for the installed serialdevice.

FIG. 1 is a block diagram illustrating one example of a system 100. Inone example, system 100 is a Retail Point of Sale (RPOS) system for usein a retail environment. In other examples, system 100 is suitable foruse in other environments. System 100 includes a Video Graphics Array(VGA) port 106, an RJ45 port 110, a Local Area Network (LAN) chip 114, aUniversal Serial Bus (USB) port 118, a serial port 122, a serial portdetection/switching circuit 126, and an RJ12 port 130. System 100 alsoincludes an Input/Output (I/O) controller 134, a Basic Input/OutputSystem (BIOS) 150, a Central Processing Unit (CPU) 136, a chipset 146, amemory 140, and a power supply 156.

VGA port 106 is communicatively coupled to chipset 146 throughcommunication link 108. RJ45 port 110 is communicatively coupled to LANchip 114 through communication link 112. LAN chip 114 is communicativelycoupled to chipset 146 through communication link 116. USB port 118 iscommunicatively coupled to chipset 146 through communication link 120.Serial port 122 is communicatively coupled to serial portdetection/switching circuit 126 through communication link 124. Serialport detection/switching circuit 126 is communicatively coupled to I/Ocontroller 134 through communication link 128. RJ12 port 130 iscommunicatively coupled to I/O controller 134 through communication link132.

I/O controller 134 is communicatively coupled to chipset 146 throughcommunication link 152. I/O controller 134 is electrically coupled topower supply 156 through path 158. Power supply 156 is electricallycoupled to chipset 146 through path 154 and to CPU 136 through path 142.CPU 136 is communicatively coupled to memory 140 through communicationlink 138 and to chipset 146 through communication link 144.

In one example, serial port 122 is an RS-232 serial port having a DB9connector. Serial port 122 is configurable to operate in one of anunpowered mode, a +5 volt powered mode, and a +12 volt powered mode.Serial port 122 may be communicatively coupled to a pole display, ascale, a barcode scanner, a credit card reader, a printer, or anothersuitable serial device. Serial port detection/switching circuit 126detects the installation and removal of a device on serial port 122 andsets serial port 122 to operate in one of the unpowered mode, the +5volt powered mode, and the +12 volt powered mode.

In one example in the unpowered mode, serial port detection/switchingcircuit 126 passes nine serial communication signals between I/Ocontroller 134 and serial port 122 including a Data Carrier Detect (DCD)signal and a Ring Indicator (RI) signal. In one example in the +5 voltpowered mode, serial port detection/switching circuit 126 passes sevenserial communication signals between I/O controller 134 and serial port122 and supplies +5 volts to serial port 122 via the DCD and RI signalpaths. In one example in the +12 volt powered mode, serial portdetection/switching circuit 126 passes seven serial communicationsignals between I/O controller 134 and serial port 122 and supplies +12volts to serial port 122 via the DCD and RI signal paths.

In one example, memory 140 stores instructions executed by CPU 136 foroperating system 100. Memory 140 includes any suitable combination ofvolatile and/or non-volatile memory, such as combinations of RandomAccess Memory (RAM), Read-Only Memory (ROM), flash memory, and/or othersuitable memory. In one example, memory 140 stores instructions executedby CPU 136 including instructions for configuring serial port 122 viaserial port detection/switching circuit 126. In one example, CPU 136executes instructions for a user interface such that a user of system100 may configure serial port 122 to operate in the unpowered mode, the+5 volt powered mode, or the +12 volt powered mode. In another example,BIOS 150 is used to configure serial port 122 to operate in theunpowered mode, the +5 volt powered mode, or the +12 volt powered mode.

Chipset 146 routes communications between CPU 136, VGA port 106, LANchip 114, USB port 118, BIOS 150, and I/O controller 134. I/O controller134 routes communications between serial port 122 and chipset 146 andbetween RJ12 port 130 and chipset 152. LAN chip 114 provides aninterface between RJ45 port 110 and chipset 146 to route communicationsbetween RJ45 port 110 and chipset 146. Power supply 156 provides powerfor system 100. In one example, power supply 156 provides multiplevoltages for the different circuits of system 100, such as 1.5 volts,1.8 volts, 3.3 volts, 5 volts, 12 volts, and/or 24 volts.

While system 100 includes one VGA port 106, one RJ45 port 110, one USBport 118, one serial port 122, and one RJ12 port 130, in other examples,system 100 includes any suitable number of ports such as more than oneUSB port and/or more than one serial port. VGA port 106 may becommunicatively coupled to a monitor or another suitable visual displayfor system 100. RJ45 port 110 may be communicatively coupled to anetwork, such as an intranet or an Internet. USB port 118 may be a 5volt USB port, a 12 volt USB port, or a 24 volt USB port. In otherexamples, system 100 may include more than one USB port, such as one 12volt USB port and one 24 volt USB port. USB port 118 may becommunicatively coupled to a pole display, a scale, a barcode scanner, acredit card reader, a printer, or another suitable device. RJ12 port 130may be communicatively coupled to a cash drawer or another suitabledevice.

In operation, and with a device installed on serial port 122, serialport detection/switching circuit 126 operates serial port 122 in one ofthe unpowered mode, the +5 volt powered mode, and the +12 volt poweredmode based on a user selected mode stored in memory 140 or in BIOS 150.In response to a device being installed or removed from serial port 122,serial port detection/switching circuit 126 resets serial port 122 tooperate in the unpowered mode. In one example in response to serial port122 being reset to operate in the unpowered mode, serial port/detectionswitching circuit 126 updates the selected mode stored in memory 140 orin BIOS 150 to the unpowered mode.

FIG. 2 is a block diagram illustrating one example of a serial portdetection/switching circuit 200. In one example, serial portdetection/switching circuit 200 provides serial port detection/switchingcircuit 126 previously described and illustrated with reference toFIG. 1. Serial port detection/switching circuit 200 includes controllogic 202, resistor 218, port connector 226, power/data switch 234, andstatus indicators 248. In one example, control logic 202 is integratedin a single semiconductor chip. In another example, control logic 202and power/data switch 234 are integrated in a single semiconductor chip.

Control logic 202 receives configuration signals through bus 206. In oneexample, bus 206 is an I2C bus, a Low Pin Count (LPC) bus, or anothersuitable bus. Control logic 202 receives a power ok signal throughcommunication link 204. In one example, the power ok signal is anRSMRST# power ok signal, an auxiliary power ok signal, or anothersuitable power ok signal. Control logic 202 is electrically coupled to abattery power source 220 through path 208 and to an auxiliary powersource 222 through path 210. In one example, auxiliary power source 222is provided by power supply 156 (FIG. 1). Control logic 202 iselectrically coupled to one terminal of resistor 218 and to portconnector 226 through port detect pin signal path 212. Control logic 202is electrically coupled to status indicators 248 and to power/dataswitch 234 through a first General Purpose Input/Output (GPIO0) signalpath 214 and a second General Purpose Input/Output (GPIO1) signal path216.

The other terminal of resistor 218 is electrically coupled to a batterypower source 224 through path 250. Port connector 226 is electricallycoupled to I/O controller 134 (FIG. 1) through pins 2-8 signal paths 228for passing serial communication signals between I/O controller 134 andport connector 226. Port connector 226 is electrically coupled topower/data switch 234 through pin 1 signal path 230 and pin 9 signalpath 232. Power/data switch 234 is electrically coupled to a +12 voltpower supply 244 through path 236 and to a +5 volt power supply 246through signal path 238. In one example, +12 volt power supply 244 and+5 volt power supply 246 are provided by power supply 156 (FIG. 1).Power/data switch 234 is electrically coupled to I/O controller 134(FIG. 1) through pin 9 signal path 240 and pin 1 signal path 242.

With the power ok signal indicating that the auxiliary power is beingsupplied to control logic 202, control logic 202 is enabled. Withcontrol logic 202 enabled, control logic 202 sets the GPIO0 signal andthe GPIO1 signal based on signals received through bus 206. Controllogic 202 also monitors the port detect pin through port detect pinsignal path 212 to determine whether a serial device is installed onport connector 226. With no device installed on port connector 226,battery power source 224 and resistor 218 provide a voltage (i.e., logichigh) on port detect pin signal path 212, which is detected by controllogic 202. In response to detecting the logic high on port detect pinsignal path 212, control logic 202 sets and/or maintains the GPIO0 andGPIO1 signals to logic low.

When a device is installed on port connector 226, battery power source224 and resistor 218 are coupled to ground through port connector 226.Accordingly, a ground (i.e., logic low) is detected on port detect pinsignal path 212 by control logic 202. In response to detecting atransition from logic high to logic low on port detect pin signal path212, control logic 202 sets and/or maintains the GPIO0 and GPIO1 signalsto logic low. With a device installed on port connector 226, controllogic 202 continues to detect a logic low on port detect pin signal path212. In one example, after setting GPIO0 and GPIO1 signals to logic lowin response to a device being installed on port connector 226, controllogic 202 initiates a request to the user to configure the serial portto operate in the unpowered mode, the +5 volt powered mode, or the +12volt powered mode. Once configured by the user to operate in the propermode, control logic 202 sets and maintains the GPIO0 and GPIO1 signalsfor the selected mode until the serial device is removed from portconnector 226.

Battery power source 220 maintains power to control logic 202 andbattery power source 224 maintains power to resistor 218 and port detectpin signal path 212 even when auxiliary power source 222 is turned off.The removal of auxiliary power is indicated by the power ok signal. Bymaintaining power to at least portions of control logic 202 and to portdetect pin signal path 212, control logic 202 maintains the logic stateof the port detect pin (i.e., whether or not a device is installed onport connector 226) so that the GPIO0 and GPIO1 signals are not reseteach time auxiliary power source 222 is turned off.

Status indicators 248 indicate the status of the serial port based onthe GPIO0 and GPIO1 signals. In one example, status indicators 248include Light Emitting Diodes (LEDs) to indicate whether the serial portis configured to operate in the unpowered mode, the +5 volt poweredmode, or the +12 volt powered mode. In one example, three differentcolored LEDs are used to indicate which of the three modes is selected.

Power/Data switch 234 passes either +5 volts, +12 volts, or serialcommunication signals based on the GPIO0 and GPIO1 signals. In theunpowered mode, power/data switch 234 passes serial communicationsignals between pin 1 signal path 242 and pin 1 signal path 230 andbetween pin 9 signal path 240 and pin 9 signal path 232. In one examplein the unpowered mode, power data switch 234 passes a DCD signal betweenpin 1 signal path 242 and pin 1 signal path 230 and passes a RI signalbetween pin 9 signal path 240 and pin 9 signal path 232. In the +5 voltpowered mode, power/data switch 234 passes +5 volts from +5 volt powersupply 246 to pin 1 signal path 230 and to pin 9 signal path 232. In the+12 volt powered mode, power/data switch 234 passes +12 volts from +12volt power supply 244 to pin 1 signal path 230 and to pin 9 signal path232.

FIG. 3 is a table 300 illustrating one example of the signal states forthe different modes of the serial port. In response to detecting an edgechange on the port detect pin signal path 212 (FIG. 2), either fromlogic high to logic low (i.e., device being installed on port connector226) or from logic low to logic high (i.e., device being removed fromport connector 226), control logic 202 (FIG. 2) sets the GPIO0 signal tologic low and the GPIO1 signal to logic low. With both the GPIO0 signaland the GPIO1 signal set to logic low, power/data switch 234 (FIG. 2)passes the DCD signal on pin 1 and the RI signal on pin 9. Accordingly,the serial port is configured to operate in the unpowered mode asindicated at 302. With a device installed on the serial port, the GPIO0signal and the GPIO1 signal may be set by the user to configure theserial port to operate in the proper mode for the installed device.

In response to detecting a logic low (i.e., device is installed) on portdetect pin signal path 212 and with the GPIO0 signal and the GPIO1signal previously set to logic low, power/data switch 234 passes the DCDsignal on pin 1 and the RI signal on pin 9. Accordingly, the serial portis configured to operate in the unpowered mode as indicated at 304. Inresponse to detecting a logic low on the port detect pin signal path 212and with the GPIO0 signal previously set to logic low and the GPIO1signal previously set to logic high, power/data switch 234 is disabled.With power/data switch 234 disabled, pin 1 is reserved and pin 9 isreserved, thus the serial port is in a reserved mode as indicated at306.

In response to detecting a logic low on port detect pin signal path 212and with the GPIO0 signal previously set to logic high and the GPIO1signal previously set to logic low, power/data switch 234 supplies +12volts to pin and to pin 9. Accordingly, the serial port is configured tooperate in the +12 volt powered mode as indicated at 308. Finally, inresponse to detecting a logic low on port detect pin signal path 212 andwith the GPIO0 signal previously set to logic high and the GPIO1 signalpreviously set to logic high, power/data switch 234 supplies +5 volts topin 1 and to pin 9. Accordingly, the serial port is configured tooperate in the +5 volt powered mode as indicated at 310.

FIG. 4A is a diagram illustrating one example of a serial port 400. Inone example, serial port 400 provides port connector 226 previouslydescribed and illustrated with reference to FIG. 2. In one example,serial port 400 includes a DB9 connector including a metal shielding 404and nine pins, which are assigned to pass serial communication signalsas follows:

Pin 1: Data Carrier Detect (DCD) or +5 volts or +12 volts

Pin 2: Received Data (RD)

Pin 3: Transmitted Data (TD)

Pin 4: Data Terminal Ready (DTR)

Pin 5: Signal Ground (SG)

Pin 6: Data Set Ready (DSR)

Pin 7: Request to Send (RTS)

Pin 8: Clear to Send (CTS)

Pin 9: Ring Indicator (RI) or +5 volts or +12 volts

Metal shielding 404 is electrically coupled to ground. As previouslydescribed, in the unpowered mode, pin 1 passes the DCD signal and pin 9passes the RI signal. In the +5 volt powered mode, pin 1 provides +5volts and pin 9 provides +5 volts. In the +12 volt powered mode, pin 1provides +12 volts and pin 9 provides +12 volts.

FIG. 4B is a diagram illustrating one example of a port detect pin 402integrated into metal shielding 404 of serial port 400. FIG. 4Billustrates a top or bottom view of serial port 400. In one example,port detect pin 402 is a touch pin that is electrically coupled toground when a device is installed on serial port 400 and electricallyopen when a device is not installed on serial port 400. In otherexamples, port detect pin 402 has other suitable configurations suchthat port detect pin 402 is electrically coupled to ground when a deviceis installed on serial port 400 and electrically open when a device isnot installed on serial port 400. In one example upon installation of adevice on serial port 400, port detect pin 402 is electrically coupledto ground prior to pin 1 and pin 9 of the device being electricallycoupled to pin 1 and pin 9 of the serial port 400, respectively. In thisway, power may be removed from serial port 400 prior to the device beingcompletely installed on serial port 400, thereby preventing damage tothe device.

Although specific examples have been illustrated and described herein,it will be appreciated by those of ordinary skill in the art that avariety of alternate and/or equivalent implementations may besubstituted for the specific examples shown and described withoutdeparting from the scope of the present disclosure. This application isintended to cover any adaptations or variations of the specific examplesdiscussed herein. Therefore, it is intended that this disclosure belimited only by the claims and the equivalents thereof.

The invention claimed is:
 1. A system comprising: a serial port; and acircuit coupled to the serial port, the circuit to: detect installationor removal of a device to the serial port; in response to a detection ofinstallation of the device to the serial port, remove power provided tothe serial port; and in response to a detection of removal of the devicefrom the serial port, remove power provided to the serial port.
 2. Thesystem of claim 1, wherein the serial port comprises a DB9 serial portand a port detect pin integrated into a metal shielding of the DB9serial port, the port detect pin to detect the installation or removalof a device to the serial port.
 3. The system of claim 2, wherein theport detect pin is electrically coupled to ground with a deviceinstalled on the serial port and electrically open without a deviceinstalled on the serial port.
 4. The system of claim 1, furthercomprising: a Basic Input/Output System (BIOS) to configure the serialport to operate in one of an unpowered mode, a +5 volt powered mode, anda +12 volt powered mode.
 5. The system of claim 4, further comprising:status indicators to indicate whether the serial port is configured tooperate in the unpowered mode, the +5 volt powered mode, or the +12 voltpowered mode.
 6. A system comprising: a serial port comprising a portdetect pin integrated into a metal shielding of the serial port; andcontrol logic to: detect a ground on the port detect pin in response toa device being installed on the serial port; detect an electrical openon the port detect pin in response to a device being removed from theserial port; remove power provided to the serial port in response to adetection of a ground on the port detect pin; and remove power providedto the serial port in response to a detection of an electrical open onthe port detect pin.
 7. The system of claim 6, further comprising: apower/data switch to provide one of serial communication signals, +5volts, and +12 volts to the serial port with a device installed on theserial port.
 8. The system of claim 7, further comprising: statusindicators to indicate whether the power/data switch is providing serialcommunication signals, +5 volts, or +12 volts to the serial port.
 9. Thesystem of claim 6, wherein the serial port comprises a DB9 serial portand the port detect pin is integrated into a metal shielding of the DB9serial port.
 10. A system comprising: a port connector comprising ninepins and a further port detect pin integrated into a metal shielding ofthe port connector; control logic electrically coupled to the portdetect pin, the control logic to detect the installation of a device onthe port connector by detecting a logic low on the port detect pin andto detect the removal of a device from the port connector by detecting alogic high on the port detect pin; and a power/data switch electricallycoupled to the first pin, the ninth pin, and the control logic, thepower/data switch to one of pass serial communication signals to thefirst pin and the ninth pin, provide +5 volts to the first pin and theninth pin, and provide +12 volts to the first pin and the ninth pinbased on signals received from the control logic.
 11. The system ofclaim 10, wherein the control logic provides signals to the power/dataswitch to pass serial communication signals to the first pin and theninth pin in response to detecting a transition between logic low andlogic high on the port detect pin.
 12. The system of claim 10, whereinthe control logic, based on a previously selected mode and in responseto detecting a logic low on the port detect pin, provides signals to thepower/data switch to one of pass serial communication signals to thefirst pin and the ninth pin, provide +5 volts to the first pin and theninth pin, and provide +12 volts to the first pin and the ninth pin. 13.The system of claim 10, further comprising: status indicatorselectrically coupled to the control logic, the status indicators toindicate whether the power/data switch is passing serial communicationsignals to the first pin and the ninth pin, providing +5 volts to thefirst pin and the ninth pin, or providing +12 volts to the first pin andthe ninth pin.
 14. The system of claim 10, further comprising: anauxiliary power source electrically coupled to the control logic; and abattery power source electrically coupled to the control logic, whereinthe battery power source maintains the logic state detected on the portdetect pin when the auxiliary power source is turned off.
 15. The systemof claim 10, further comprising: a battery power source electricallycoupled to the port detect pin to maintain the logic state on the portdetect pin.
 16. The system of claim 1, further comprising: a power/dataswitch to provide one of serial communication signals, +5 volts, and +12volts to the serial port with a device installed on the serial port. 17.The system of claim 16, wherein the power/data switch is electricallycoupled to a first pin of the serial port, a ninth pin of the serialport, and the control logic.
 18. The system of claim 17, wherein thepower/data switch is to one of pass serial communication signals to thefirst pin and the ninth pin, provide +5 volts to the first pin and theninth pin, and provide +12 volts to the first pin and the ninth pinbased on signals received from the control logic.
 19. The system ofclaim 7, wherein the power/data switch is electrically coupled to afirst pin of the serial port, a ninth pin of the serial port, and thecontrol logic.
 20. The system of claim 19, wherein the power/data switchis to one of pass serial communication signals to the first pin and theninth pin, provide +5 volts to the first pin and the ninth pin, andprovide +12 volts to the first pin and the ninth pin based on signalsreceived from the control logic.